import Vue from "vue";
import Router from "vue-router";
const Login = () =>
    import ( /* webpackChunkName: "Login" */ "@/components/Login");
const Main = () =>
    import ( /* webpackChunkName: "Main" */ "@/components/Main");
const Table = () =>
    import ( /* webpackChunkName: "Table" */ "@/components/Table");
const Setting = () =>
    import ( /* webpackChunkName: "Setting" */ "@/components/WebSet");

Vue.use(Router);

export const routerConfig  = [{
    path: "/table",
    name: "table",
    component: Table,
    title: "表单管理"
}, {
    path: "/setting",
    name: "setting",
    component: Setting,
    title: "网站设置"
}];

export const router = new Router({
    routes: [{
        path: "/",
        name: "home",
        component: Main,
        children: routerConfig 
    }, {
        path: "/login",
        name: "login",
        component: Login,
        title: "用户登录"
    }]
});


